import { useEffect, useState } from 'react'
import useDebounds from './hooks/UesDebounds';

function App () {

  // #region 变量声明
  const [value, setValue] = useState('')
  const deValue = useDebounds({value, delay: 1000})
  // #endregion

  // #region 函数

  // #endregion

  // #region Hooks
  useEffect(() => {
    if (!deValue) return
    console.log(deValue)
  }, [deValue])
  // #endregion

  return (
    <div>
      <input type="text" value={value} onChange={(e) => setValue(e.target?.value)} />
    </div>
  )
}

export default App
